home *** CD-ROM | disk | FTP | other *** search
/ Netware Super Library / Netware Super Library.iso / mis_cnvt / asctodbf / ascdbf26.txt < prev   
Text File  |  1992-08-18  |  10KB  |  243 lines

  1.                               A S C t o D B F
  2.                                by Dick Koster
  3.                                Ver 2.6  1992
  4.  
  5.  
  6.     ASCtoDBF is a utility to convert a text report file into an ASCII
  7. delimited text file suitable for importation into other programs such as
  8. Lotus 123, dBase III+ / IV, etc.
  9.  
  10.  
  11.                            THE DESCRIPTOR TABLES:
  12.                            ----------------------
  13.  
  14.     Before processing the input text file, three tables are created by the
  15. user within the program.
  16.  
  17.     1.  Exclusion Table      -      Not Required
  18.     2.  Group Id Table       -      Not Required
  19.     3.  Fielding Table       -      Required (else blank output!)
  20.  
  21.  
  22.     The EXCLUSION TABLE contains up to 12 text sequences that you wish
  23. omitted from the output.  These are usually report headers, summary lines,
  24. page numbers, etc.  (Blank lines are automatically omitted.)  The table
  25. from the example at the end of this text is as follows:
  26.  
  27.                            1.  part#
  28.                            2.  -----
  29.                            3.  sparkie
  30.                            4.
  31.                                   .
  32.                                   .
  33.                                   .
  34.                           12.
  35.  
  36.  
  37.     The GROUP ID TABLE contains up to 10 entries, each one including a text
  38. sequence, starting location, length, and type (character or numeric).
  39.  
  40.     Sometimes a report may have a header line for each major classification
  41. of ensuing data.  These could be a customer name, customer number, date,
  42. salesman, etc.  (see sample report below).  This data is NOT repeated with
  43. each individual line item that follows.  However, this "header" information
  44. is pertinent to grouping its associated data within a database program.
  45.  
  46.     These key header items can be searched for.  When found, other
  47. information on the same line defined by the start/length/type criteria can
  48. be extracted and prefixed to the output data as a unique field.  (see
  49. sample output below).
  50.  
  51.             No.  Id Sequence Text       Start  Length Type
  52.              1.  CUSTOMER:                12      22     C
  53.              2.  DATE:                    41       8     C
  54.              3.  NUMBER:                   9       5     N
  55.              4.                            0       0
  56.                     .
  57.                     .
  58.                     .
  59.             10.                            0       0
  60.  
  61.  
  62.     The FIELDING TABLE contains up to 20 entries that tell the program
  63. which columns of the remaining input file to include as unique fields in
  64. the output.  The starting column position, its length, and field type
  65. (character or numeric) is assigned...as well as a field descriptor for user
  66. documentation purposes only.
  67.  
  68.     The order that these items appear in the table dictate the order in the
  69. output delimited ascii file.  Line items may be changed, inserted, or
  70. removed from the table during initial entry (or later during table
  71. maintenance to an existing parameter file.)  A sample Fielding Table:
  72.  
  73.                 Fld  Description  Start  Length  Type
  74.                  1.  INVOICE NO.     1       5     N
  75.                  2.  PART NO.       15       5     C
  76.                  3.  DESCRIPTION    25      16     C
  77.                  4.  QUANTITY       45       8     N
  78.                  5.  PRICE          55      13     N
  79.                  6.                  0       0
  80.                         .
  81.                         .
  82.                         .
  83.                 20.                  0       0
  84.  
  85.  
  86.                             THE PARAMETER FILE:
  87.                             -------------------
  88.  
  89.     When the program is run, it first asks for a parameter filename.  This
  90. is the file in which the abovementioned tables are stored so they may be
  91. used again in both manual and automatic processing mode (see below).  If
  92. the file does not exist, it will create a new empty one.  If it exists, it
  93. will load the tables for processing or editing.  Any changes will be
  94. updated into the parameter file upon program exit.
  95.  
  96.     Two other items are also stored in the parameter file; the input
  97. filename, and the output filename.  These two items are only used if a
  98. command line parameter (see below) requests a specific parameter file.
  99. This places the program into "automatic" mode and no user prompts are
  100. issued.  Hence, once a parameter file is created to edit a specific report,
  101. it may be used in a batch file to automatically process reoccurring
  102. reports.
  103.  
  104.  
  105.                            COMMAND LINE OPTIONS:
  106.                            ---------------------
  107.  
  108.     At startup, a short display sequence illustrates a "sample" input and
  109. output file format.  This may be bypassed by including a quickload command
  110. line parameter.  (This parameter will be forwarded to you when the program
  111. is registered for the paultry sum of $5.00)  However, it is automatically
  112. deactivated in automatic mode processing.
  113.  
  114.                 ASCtoDBF  ??      (where ?? is the quickload code)
  115.  
  116.     If you are running a monochrome monitor, and the cursor or highlighting
  117. features seem to be inoperable, the video sensing software may be
  118. misinterpreting your system.  To force the program into "monochrome" mode,
  119. include a /M parameter on the command line.  Likewise, to force "color"
  120. mode, include a /C on the command line.
  121.  
  122.                      ASCtoDBF /M     or    ASCtoDBF /c
  123.  
  124.     Once the parameter file is established, it can be called to implement
  125. "automatic" mode processing.  This is accomplished by placing a
  126. /P=ParamName switch on the command line, where "ParamName" is the parameter
  127. filename:
  128.  
  129.                      ASCtoDBF /p=b:\subdir\DAILY.FIL /m
  130.  
  131.     When the above line is executed, the program will read the parameter
  132. file called "DAILY.FIL" on floppy drive B: in subdirectory "\subdir" which
  133. the user has previously created.  The internally specified input and output
  134. text filenames are used as defaults.  The short format display at the
  135. beginning of the program is turned off automatically, and the video mode is
  136. forced to monochrome.
  137.  
  138. <Notes>  (1) The order of command line switches is irrelevant.
  139.          (2) Device/path names supported for all files.
  140.  
  141.  
  142.                                PRINT OPTION:
  143.                                -------------
  144.  
  145.     Before processing the input file (in manual mode), the user is prompted
  146. for an output device/filename on which to print the contents of the
  147. parameter file.  To skip this option, merely depress the ENTER key at this
  148. prompt.  Hard drive filenames, floppy drives, LPT1:, LPT2:, PRN, etc.  are
  149. supported for this listing.
  150.  
  151.  
  152.                          IMPORTING INTO DBASE III+
  153.                          -------------------------
  154.  
  155.     Once the ascii delimited file has been made, create the structure
  156. accordingly in dBase.  You may also position the items in Table 2 to
  157. correspond to an existing dBase structure.  With the database open, enter
  158. the following line in dBase at the dot prompt:
  159.  
  160.                    APPEND FROM filename DELIMITED WITH "
  161.  
  162.     This will load the delimited ascii text file into the dBase database
  163. file.
  164.  
  165.  
  166. --------------------------------------------------------------------------
  167.                              SAMPLE INPUT TEXT
  168. --------------------------------------------------------------------------
  169.  
  170.                           J.J. Sparkie Corp
  171.  
  172.  
  173. Customer:  Sears, Inc.            Date: 11/23/92
  174. Number: 45587
  175.  
  176. INVOICE#      PART#     DESCRIPTION         QUANTITY       PRICE
  177. --------      -----     ----------------    --------      --------
  178.  
  179. 18837         2A341     Table Saw                 10     $5,867.27
  180. 18838         1-400     Paint Sprayer            200     $3,214.16
  181.  
  182. Customer:  Grossman's             Date: 11/23/92
  183. Number: 21200
  184.  
  185. INVOICE#      PART#     DESCRIPTION         QUANTITY       PRICE
  186. --------      -----     ----------------    --------      --------
  187.  
  188. 34122         A4427     Nails                 12,000        $98.99
  189. 45000         45555     Screws               100,000       $877.45
  190.  
  191. Customer:  Ajax Lumber            Date: 12/25/92
  192. Number: 80174
  193.  
  194. INVOICE#      PART#     DESCRIPTION         QUANTITY       PRICE
  195. --------      -----     ----------------    --------      --------
  196.  
  197. 00872         5600G     Plywood                   50       $750.00
  198. 00873         1L277     Paint                    300     $3,000.00
  199.  
  200. Customer:                         Date:
  201. Number:
  202.  
  203. INVOICE#      PART#     DESCRIPTION         QUANTITY       PRICE
  204. --------      -----     ----------------    --------      --------
  205.  
  206. 11211                   Road Service               1        $70.00
  207.                         Phone Call                           $4.50
  208. 45400         NoChg     Loaner                     1           n/a
  209.  
  210. Customer:  Sommerville Supply     Date: 10/14/91
  211. Number: 12345
  212.  
  213. INVOICE#      PART#     DESCRIPTION         QUANTITY       PRICE
  214. --------      -----     ----------------    --------      --------
  215.  
  216. 99001         C-001     Windows                   10      $-623.18
  217. 99002         C-002     Doors                      3       $733.20-
  218.  
  219.  
  220. --------------------------------------------------------------------------
  221.                           SAMPLE OUTPUT ASCII TEXT
  222. --------------------------------------------------------------------------
  223.  
  224. "SEARS, INC.","11/23/92",45587,18837,"2A341","Table Saw",10,5867.27
  225. "SEARS, INC.","11/23/92",45587,18838,"1-400","Paint Sprayer",200,3214.16
  226. "GROSSMAN'S","11/23/92",21200,34122,"A4427","Nails",12000,98.99
  227. "GROSSMAN'S","11/23/92",21200,45000,"45555","Screws",100000,877.45
  228. "AJAX LUMBER","12/25/92",80174,00872,"5600G","Plywood",50,750.00
  229. "AJAX LUMBER","12/25/92",80174,00873,"1L277","Paint",300,3000.00
  230. "","",0,11211,"","Road Service",1,70.00
  231. "","",0,0,"","Phone Call",0,4.50
  232. "","",0,45400,"NoChg","Loaner",1,0
  233. "SOMMERVILLE SUPPLY","10/14/91",12345,99001,"C-001","Windows",10,-623.18
  234. "SOMMERVILLE SUPPLY","10/14/91",12345,99002,"C-002","Doors",3,733.20-
  235.  
  236.  
  237. -----------------------------------------------------------------------
  238.     For questions, suggestions, or registration I can be notified at:
  239.  
  240.                         Dick Koster
  241.                         35 Guinevere Road
  242.                         N. Easton, MA 02356
  243.                         CompuServe (72627,1670)